A modular foreign function interface
نویسندگان
چکیده
Foreign function interfaces are typically organised monolithically, tying together the specification of each foreign function with the mechanism used to make the function available in the host language. This leads to inflexible systems, where switching from one binding mechanism to another (say from dynamic binding to static code generation) often requires changing tools and rewriting large portions of code. We show that ML-style module systems support exactly the kind of abstraction needed to separate these two aspects of a foreign function binding, leading to declarative foreign function bindings that support switching between a wide variety of binding mechanisms — static and dynamic, synchronous and asynchronous, etc. — with no changes to the function specifications. Note. This is a revised and expanded version of an earlier paper, Declarative Foreign Function Binding Through Generic Programming (Yallop et al., 2016). This paper brings a greater focus on modularity, and adds new sections on error handling, and on the practicality of the approach we describe.
منابع مشابه
Fixed point theorem for non-self mappings and its applications in the modular space
In this paper, based on [A. Razani, V. Rako$check{c}$evi$acute{c}$ and Z. Goodarzi, Nonself mappings in modular spaces and common fixed point theorems, Cent. Eur. J. Math. 2 (2010) 357-366.] a fixed point theorem for non-self contraction mapping $T$ in the modular space $X_rho$ is presented. Moreover, we study a new version of Krasnoseleskii's fixed point theorem for $S+T$, where $T$ is a cont...
متن کامل$C$-class functions on common fixed point theorems for weak contraction mapping of integral type in modular spaces
In this paper, we use the concept of $C$-class functions introduced by Ansari [4] to prove the existence and uniqueness of common fixed point for self-mappings in modular spaces of integral inequality. Our results extended and generalized previous known results in this direction.
متن کاملDeclarative Foreign Function Binding Through Generic Programming
Foreign function interfaces are typically organised monolithically, tying together the specification of each foreign function with the mechanism used to make the function available in the host language. This leads to inflexibile systems, where switching from one binding mechanism to another (say from dynamic binding to static code generation) often requires changing tools and rewriting large po...
متن کاملThe Layers of Larceny’s Foreign Function Interface
The Foreign Function Interface (FFI) in Larceny supports interacting with dynamically loaded C libraries via glue code written in Scheme. The programmer does not need to develop any C code to interface with C libraries. The FFI is divided into layers of Larceny Scheme code; the lower layers implement kernel functionality, and the higher layers support portable glue code development. The lower l...
متن کاملForeign-Function Interfaces for Garbage-Collected Programming Languages
Programs in high-level, garbage-collected programming languages often need to access libraries that are written in other programming languages. A foreign-function interface provides a high-level language with access to low-level programming languages and negotiates between the inside and the outside world by taking care of the low-level details. In this paper, I provide an overview of what diff...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015